Stored Procedures [dbo].[amsp_CMProcessFolderDeletion]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@InContentIDnumeric(18,0)9
@InWebsiteKeyuniqueidentifier16
Permissions
TypeActionOwning Principal
GrantExecuteIMIS
SQL Script
CREATE PROCEDURE amsp_CMProcessFolderDeletion
  @InContentID numeric,
  @InWebsiteKey uniqueidentifier
AS
BEGIN
  DECLARE
    @NavMenuID numeric,
    @PreviousWebsiteKey uniqueidentifier

  -- For now, we're only going to take care of the situation where
  -- we need to update PreviousWebsiteKey
  SELECT @NavMenuID = b.NavMenuID,
         @PreviousWebsiteKey = b.PreviousWebsiteKey
    FROM Content a WITH (NOLOCK), Nav_Menu b WITH (NOLOCK)
   WHERE a.NavMenuID = b.NavMenuID
     AND a.ContentID = @InContentID

  IF @PreviousWebsiteKey IS NOT NULL AND @PreviousWebsiteKey = @InWebsiteKey BEGIN
    UPDATE Nav_Menu
       SET PreviousWebsiteKey = NULL
     WHERE NavMenuID = @NavMenuID
  END
END

GO
GRANT EXECUTE ON  [dbo].[amsp_CMProcessFolderDeletion] TO [IMIS]
GO
Uses